package com.xmut.mall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xmut.mall.product.entity.BrandEntity;
import com.xmut.mall.product.utils.PageUtils;
import com.xmut.mall.product.entity.CategoryBrandRelationEntity;
import com.xmut.mall.product.utils.RespBean;
import com.xmut.mall.product.vo.CategoryBrandVO;

import java.util.List;
import java.util.Map;

/**
 * 品牌分类关联
 *
 * @author 1912120131suntingxing
 * @email 1192081604@qq.com
 * @date 2022-07-14 00:45:34
 */
public interface CategoryBrandRelationService extends IService<CategoryBrandRelationEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveDetail(CategoryBrandRelationEntity categoryBrandRelation);

    void updateBrand(Long brandId, String name);

    void updateCategory(Long catId, String name);

    List<BrandEntity> getBrandsByCatId(Long catId);

    /**
     * 根据分类Id获取品牌和分类的关联数据
     * @param cateId
     * @return
     */
    List<CategoryBrandVO> getCateBrandRelation(Long cateId);

    /**
     * 添加品牌和分类的关联
     * @param params
     * @return
     */
    RespBean addCateBrandRelation(Map<String, Long> params);
}

